<template>
  <div class="edit-view">
    <el-form class="yh" ref="form" :model="form" label-width="100px" >
      <el-form-item label="用户名">
        <el-input :v-model="form.name" />
      </el-form-item>
      <el-form-item label="用户密码">
        <el-input :v-model="form.author" />
      </el-form-item>
      <el-form-item label="用户头像">
        <el-upload
          class="upload-demo"
          action="https://jsonplaceholder.typicode.com/posts/"
          multiple
          :limit="3"
          :v-model="form.cover"
        >
          <el-button size="small" type="primary">点击上传</el-button>
          <div slot="tip" class="el-upload__tip">
            只能上传jpg/png文件,且不超过500kb
          </div>
        </el-upload>
      </el-form-item>

      <el-form-item label="用户b币数">
        <el-input :v-model="form.video" />
      </el-form-item>
      <el-form-item label="用户等级">
        <el-input :v-model="form.perated" />
      </el-form-item>
      <el-form-item label="用户当前经验">
        <el-input :v-model="form.giveThe" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary">添加</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'Attr',
  data() {
    return {
      form: {
        name: '',
        cover: '',
        author: '',
        video: '',
        perated: '',
        giveThe: '',
        data: ''
      }
    }
  }
}
</script>

<style lang="scss" scoped>
div {
  width: 600px;
  // line-height: 24px;
}

.edit-view {
  margin: 20px 0px 0px 20px;
}

.edit-view .yh{
  line-height: 24px;
}
</style>
